package com.sdgakj.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.util.Date;

/*
 * 帖子消息表
 **/
@Entity
@Table(name = "f_feed_msg")
public class FeedMsg extends IdEntity {

	private Long targetId; // 目标id，feedId feedCommentId
	private Long customerId; // 目标id，feedId feedCommentId
	private Integer targetType; // 类型，  1feed 2comment
	private Integer type; // 类型， 1删除
	private String content; // 消息内容
	private Date createDate; // 创建日期

	public FeedMsg() {

	}
	
	public FeedMsg(Long targetId, Long customerId, Integer targetType, Integer type, String content, Date createDate) {
		super();
		this.targetId = targetId;
		this.customerId = customerId;
		this.targetType = targetType;
		this.type = type;
		this.content = content;
		this.createDate = createDate;
	}

	public Integer getTargetType() {
		return targetType;
	}

	public void setTargetType(Integer targetType) {
		this.targetType = targetType;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Long getTargetId() {
		return targetId;
	}

	public void setTargetId(Long targetId) {
		this.targetId = targetId;
	}

	public Long getCustomerId() {
		return customerId;
	}

	public void setCustomerId(Long customerId) {
		this.customerId = customerId;
	}
	
}
